package com.cmcc.passenger.data.service

import com.cmcc.shared.model.GeoCodeResult
import com.cmcc.shared.model.GoogleDirection
import com.cmcc.shared.model.GooglePlace
import kotlinx.coroutines.Deferred
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Query

interface GoogleApiService {

    @GET("place/findplacefromtext/json")
    fun findPlaceFromText(
        @Query("input") input: String, @Query("inputtype") inputType: String, @Query(
            "fields"
        ) fields: String, @Query("key") key: String
    ): Deferred<GooglePlace>

    @GET("geocode/json")
    fun geocode(@Query("latlng") latlng: String): Deferred<Response<GeoCodeResult>>


    @GET("directions/json")
    fun getDirection(@Query("origin") origin: String, @Query("destination") destination: String): Deferred<Response<GoogleDirection>>

    //
    //    @GET("directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood&key=YOUR_API_KEY")
    //    Observable<>
}
